import Vue from 'vue'
import Router from 'vue-router'
import sectionOne from './map/sectionOne'
import sectionTwo from './map/sectionTwo'
import sectionThree from './map/sectionThree'

Vue.use(Router)

let routes = [...sectionOne, ...sectionTwo, ...sectionThree];

export default new Router({
  routes: [
    {
      path: '/',
      redirect: '/sectionOne'
    },
    {
      path: '/login',
      name: 'login',
      component: resolve => require(['VIEWS/public/login'], resolve)
    },
    {
      path: '/',
      name: 'home',
      component: resolve => require(['VIEWS/public/home'], resolve),
      children: routes
    }
  ]
})
